/**
 * 
 */
package org.yelongframework.model.support.mybatis.sql;

import java.io.Serializable;

import org.yelongframework.lang.Nullable;

/**
 * mybatis绑定的SQL,执行的SQL语句及SQL所需要的参数
 * 
 * @since 1.0.0
 */
public final class MybatisBoundSql implements Serializable {

	private static final long serialVersionUID = 2145753640449133662L;

	private final String mybatisSql;

	@Nullable
	private final MybatisParamMap mybatisParamMap;

	public MybatisBoundSql(String mybatisSql, @Nullable MybatisParamMap mybatisParamMap) {
		this.mybatisSql = mybatisSql;
		this.mybatisParamMap = mybatisParamMap;
	}

	public String getMybatisSql() {
		return mybatisSql;
	}

	@Nullable
	public MybatisParamMap getMybatisParamMap() {
		return mybatisParamMap;
	}

	@Override
	public String toString() {
		StringBuilder print = new StringBuilder();
		print.append("-------sql : " + mybatisSql);
		print.append("\n");
		print.append("-------param : " + mybatisParamMap);
		return print.toString();
	}

}
